<template>
  <view w-full box-border pa-20rpx>
    <view bg="#fff" rounded-20rpx mb-20rpx>
      <nut-form>
        <nut-form-item prop="memberRelation" label="成员关系">
          <text text-black>{{ relation[form.memberRelation] }}</text>
          <!-- <nut-input
         
            v-model="relation[form.memberRelation]"
            
            class="nut-input-text"
            placeholder=""
            type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="nickName" label="真实姓名">
          <text text-black>{{ form.nickName }}</text>
          <!-- <nut-input v-model="form.nickName"  placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="birthday" label="出生日期">
          <text text-black>{{ form.birthday }}</text>
          <!-- <nut-input v-model="form.birthday"  class="nut-input-text" placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="region" label="所在区域">
          <text text-black>{{ form.region }}</text>
          <!-- <nut-input v-model="form.region"  class="nut-input-text" placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="detailAddress" label="详细地址">
          <text text-black>{{ form.detailAddress }}</text>
          <!-- <nut-input v-model="form.detailAddress"  class="nut-input-text" placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="mobile" label="联系电话">
          <text text-black>{{ form.mobile }}</text>
          <!-- <nut-input v-model="form.mobile"  class="nut-input-" placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="bindSchool"  label="绑定学校">
          <text text-black>{{ form.bindSchool ? form.bindSchool.join(',') : '--' }}</text>
          <!-- <nut-input v-model="form.bindSchool" class="nut-input-" placeholder="" type="text" /> -->
        </nut-form-item>
        <nut-form-item prop="bindUnit"  label="绑定单位">
          <text text-black>{{ form.bindUnit ? form.bindUnit.join(',') : '--' }}</text>
          <!-- <nut-input v-model="form.bindUnit" class="nut-input-" placeholder="" type="text" /> -->
        </nut-form-item>
      </nut-form>
    </view>
  </view>
</template>

<script setup lang="ts">
import { myFamilyMemberDetail } from '@/api/familyMember'
import { onLoad } from '@dcloudio/uni-app'

const form = ref<any>({})
const relation = ref<any>({
  null: '主账号',
  1: '父子',
  2: '父女',
  3: '母子',
  4: '母女',
  5: '父母',
  6: '配偶',
  7: '朋友'
})

onMounted(() => {})
onLoad((options: any) => {
  if (options.id) {
    myFamilyMemberDetail(options.id).then((res: any) => {
      form.value = res.data.result
    })
  }
})
</script>
<style>
page {
}
</style>
<style scoped lang="scss"></style>
